Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypedChildrenFn impl Clone trait #3349

Merged
merged 1 commit into from
Dec 16, 2024
Merged

TypedChildrenFn impl Clone trait #3349

merged 1 commit into from
Dec 16, 2024

Conversation

redforks
Copy link
Contributor

TypedChildrenFn wraps Arc<dyn Fn() -> View<T> + Send + Sync>, but not derived with Clone, I think it is logical for a type based on Arc, and type ViewFn derived with Clone as well.

@gbj
Copy link
Collaborator

gbj commented Dec 14, 2024

I agree that it should implement Clone, but using #[derive(Clone)] here will put a T: Clone bound on it, which isn't necessary. It should be a manual Clone implementation that uses Arc::clone() on the inner Arc instead.

@redforks
Copy link
Contributor Author

Update the source code,

@gbj gbj merged commit 881734b into leptos-rs:main Dec 16, 2024
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants